package jolly_jumper;

import java.io.*;

class Main implements Runnable
{
	static String ReadLn(int maxLength)
	{  
        byte line[] = new byte [maxLength];
        int length = 0;
        int input = -1;
        try{
            while (length < maxLength){
                input = System.in.read();
                if ((input < 0) || (input == '\n')) break; 
                line [length++] += input;
            }

            if ((input < 0) && (length == 0)) return null;  
            return new String(line, 0, length);
        }catch (IOException e){
            return null;
        }
    }
	
	public static void main(String args [])
	{
		Main work = new Main();
	
		work.run();
	}
	
	public void run()
	{
		new WorkingStuff().run();
	}
}

class WorkingStuff implements Runnable
{
	public void run() 
	{
		String input;
		
		while ((input = Main.ReadLn(3003)) != null)
		{
			String [] values = input.trim().split(" ");
			int num = Integer.parseInt(values[0]);
			
			int [] elements = new int[num];

			for (int i = 1; i < num + 1; i++) 
			{
				elements[i - 1] = Integer.parseInt(values[i]);
			}

			jollyJumper(elements);
			
		}
	}
	
	void jollyJumper(int [] inputs)
	{
		boolean [] bitVector = new boolean[inputs.length];
	
		for (int index = 0; index < inputs.length - 1; index++)
		{
			long difference = Math.abs(inputs[index] - inputs[index+1]);
			
			if (difference < bitVector.length && difference > 0)
			{
				bitVector[(int) difference] = true;
			}
		}
		
		for (int index = 1; index < bitVector.length; index++)
		{
			if (bitVector[index] == false)
			{
				System.out.println("Not jolly");
				return;
			}
		}
		
		System.out.println("Jolly");
	}
}
